<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>计算哪个人总分高</title>
  </head>
  <body>
    <script>
      let stus = [
        {
          name: '李四',
          lang: {
            js: 89,
            css: 90,
          },
        },
        {
          name: '张三',
          lang: {
            js: 10,
            css: 81,
          },
        },
        {
          name: '王五',
          lang: {
            js: 28,
            css: 100,
          },
        },
      ]
      let resDesc = stus
        .map((stu) => {
          stu.sum = stu.lang.js + stu.lang.css
          return stu
        })
        .sort((a, b) => {
          return a.sum - b.sum
        })
        .filter((s) => {
          return s.sum / 2 > 60
        })
      console.table(resDesc)
    </script>
  </body>
</html>
